<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="Dome.css">
</head>
<body>
<div id="app">
    <div class="cal">
        算式<input type="text" v-model="shuanshi" readonly/><br>
        输⼊<input type="text" v-model="num"/>
        结果：<input type="text" v-model="result"/>
    <table class="content">
        <tr>
            <td><div @click="clear">C</div></td>
            <td><div @click="clearCe">CE</div></td>
            <td><div></div></td>
            <td><div></div></td>
        </tr>
        <tr>
            <td><div @click="btnNum('1')">1</div></td>
            <td><div @click="btnNum('2')">2</div></td>
            <td><div @click="btnNum('3')">3</div></td>
            <td><div @click="btnF('+')">+</div></td>
        </tr>
        <tr>
            <td><div @click="btnNum('4')">4</div></td>
            <td><div @click="btnNum('5')">5</div></td>
            <td><div @click="btnNum('6')">6</div></td>
            <td><div @click="btnF('-')">-</div></td>
        </tr>
        <tr>
            <td><div @click="btnNum('7')">7</div></td>
            <td><div @click="btnNum('8')">8</div></td>
            <td><div @click="btnNum('9')">9</div></td>
            <td><div @click="btnF('*')">*</div></td>
        </tr>
        <tr>
            <td><div @click="btnF('/')">/</div></td>
            <td><div @click="btnNum('0')">0</div></td>
            <td><div @click="btnF('.')">.</div></td>
            <td><div @click="btnF('=')">=</div></td>
        </tr>
    </table>
</div>
</div>
<script src="../../../../vue.global.js"></script>
<script src="Dome.js"></script>
<!--<script>-->
<!--    Vue.createApp({-->
<!--        data() {-->
<!--            return{-->
<!--                shuanshi:'',-->
<!--                num:'',-->
<!--                result:''-->
<!--            }-->
<!--        },-->
<!--        methods: {-->
<!--            btnNum(shu){-->
<!--                this.num += shu;-->
<!--            },-->
<!--            btnF(fuhao){-->
<!--                if(fuhao != '='){-->
<!--                    this.shuanshi += this.num + fuhao;-->
<!--                    this.num = ''-->
<!--                }else {-->
<!--                    this.shuanshi += this.num;-->
<!--                    this.result = eval(this.shuanshi);-->
<!--                }-->
<!--            },-->
<!--            clear() {-->
<!--                this.num = '';-->
<!--                this.shuanshi = '';-->
<!--            },-->
<!--            clearCe() {-->
<!--                this.num = '';-->
<!--            }-->
<!--        },-->
<!--        computed: {-->
<!--            newnum() {-->
<!--                return this.result.toFixed(2)-->
<!--            }-->
<!--        }-->
<!--    }).mount('#app');-->
<!--</script>-->
</body>
</html>